package com.zhentao.product.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhentao.model.entity.product.ProductSku;
import com.zhentao.product.mapper.ProductSkuMapper;
import com.zhentao.product.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class ProductServiceImpl extends ServiceImpl<ProductSkuMapper, ProductSku> implements ProductService {
    @Resource
    private ProductSkuMapper productSkuMapper;


    @Override
    public List<ProductSku> findProductSkuBySale() {
        return productSkuMapper.findProductSkuBySale();
    }

    //业务接口实现
    @Override
    public ProductSku getBySkuId(Long skuId) {
        return productSkuMapper.selectById(skuId);
    }
}
